
#pragma once

#include <ConnectionBroker/Packet.h>
#include <ConnectionBroker/Typedefs.h>
#include <boost/shared_ptr.hpp>

#include <vector>

namespace ConnectionBroker
{
   class ClientConnection
   {
      protected: //Member variables
      std::vector<uint32_t> mChannels;
      bool mAuthenticated;

      public: //Constructor, destructor
      ClientConnection();
      virtual ~ClientConnection();

      public: //Getters
      const bool authenticated() const { return mAuthenticated; }

      public: //Setters
      void authenticate() { mAuthenticated = true; }

      public: //Interface
      virtual void write(const Packet& pPacket) = 0;
      virtual void subscribeTo(const std::vector<uint32_t>& channels);
      virtual bool subscribedTo(const uint32_t channel);
      virtual void unsubscribeFrom(const std::vector<uint32_t>& channels);

   }; 
}

